package com.yty.order.form;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import java.util.List;

@ApiModel("购物车")
@Data
public class OrderForm {
    @ApiModelProperty(name = "name", value = "买家姓名")
    @NotEmpty(message = "买家姓名不能为空")
    private String buyerName;

    @ApiModelProperty(name = "phone", value = "买家电话")
    @NotEmpty(message = "手机号不能为空")
    private String buyerPhone;

    @ApiModelProperty(name = "address", value = "买家地址")
    @NotEmpty(message = "地址不能为空")
    private String buyerAddress;

    @ApiModelProperty(name = "openid", value = "买家openid")
    @NotEmpty(message = "openid不能为空")
    private String buyerOpenid;

    @ApiModelProperty(name = "items", value = "商品购买详情")
    @NotEmpty(message = "购买详情不能为空")
    private List<OrderDetailForm> orderDetails;
}
